<include file="Public:header"/>
<body data-tuktuk="boxes">
<include file="Public:left"/>
<include file="Public:aside"/>


    <section>
        <header>
            <h3 class="on-left text thin">{$Think.config.APP_NAME}</h3>
            <a href="{:U('Admin/Index/chooseApp')}" class="on-right text big icon list" >切换</a>
        </header>
        <hr />
        <article class="padding scroll">
            <div class="margin-bottom">
                <h4 class="text book inline">基本资料</h4>
                <div class="on-right ">
                	<a href="{:U('Admin/Info/add')}" class="button theme small icon back" >新增</a>
                	<a href="{:U('Admin/Info/index')}" class="button theme small icon back" >返回</a>
                </div>
            </div>            
            <hr />
            <form name="form" method="post" action="{:U('Admin/Info/update')}" class="margin form-validate">
            <input type="hidden" name="id" value="{$vo.id}">
                <fieldset>
                    <label>标题:<small>必须输入</small></label>
                    <input type="text" value="{$vo.title}" name="title" >
                </fieldset>

                <fieldset>
                    <label>分类:<small>选择页面导航分类</small></label>
                    <span class="select">
                        <select data="{$vo.navid}" name="navid">
                            <volist name="navs" id="nav">
                            <option value="{$nav.id}">{$nav.name}</option>
                            </volist>
                        </select>
                    </span>
                </fieldset>
                
                <fieldset>
                    <label>封面图片:<small>在调用图片信息的时候会显示</small></label>
                    <input type="text" value="{$vo.picurl}" name="picurl"  >
                </fieldset>

                <fieldset>
                    <label>点击数:<small>默认为0,不会显示</small></label>
                    <input type="text" value="{$vo.hits}" name="hits">
                </fieldset>

                <fieldset>
                    <label>排序:<small>数字越小越靠前</small></label>
                    <input type="text" value="{$vo.idx}" name="idx">
                </fieldset>

                <fieldset>
                    <include name="intro" file="Public:ueditor" value="{$vo.intro|addslashes|filterueditor}"  />
                </fieldset>
                <hr />
                <button type="submit">保存</button>
            </form>
            
            
        </article>

        <footer class="bck dark text center">
            Powered by <a href="http://www.weiduniang.com" class="color theme text bold">Weiduniang</a>
        </footer>
    </section>
    
</body>
<load href="Public/js/app.js" />
<load href="Public/js/jquery.validation.min.js" />
<script type="text/javascript">
$(function(){
	$('select[data]').each(function(){
		var v = $(this).attr('data');
		$(this).val(v);
	})
    if ($('.form-validate').length > 0) {
        $('.form-validate').each(function() {
            var $obj = $(this);
            $obj.validate({
                // errorElement: 'span',
                // errorClass: 'help-block has-error',
                errorPlacement: function(error, element) {
                    $(element).attr('required','required');
                },
                highlight: function(label,element) {
                    $(element).attr('required','required');
                },
                success: function(label,element) {
                    $(element).removeAttr('required');
                },
                onkeyup: function(element) {
                    $(element).valid();
                },
                onfocusout: function(element) {
                    $(element).valid();
                }
            });
        });
    }
})    
</script>
</html>
